<template>
  <div id="productionManagement" :class="{smallFontSize:showEdition,mediumFontSize:!showEdition}">
    <div v-if="isShow" style="height: 100vh;overflow-y: auto">
      <div>
        <form action="/">
          <van-search
            style="
           width: calc(100% - 4px);
           background: #EEE;
           border-radius: 10px;
           height:40px;
           font-size: 14px;
           float: left"
            v-model="SearchData"
            placeholder="请输入信息"
            @search="onSearch"
          />
        </form>
      </div>
      <div>
        <van-list  >
          <van-cell v-for="(item, index) in contentData" @click="contentClick(item)" :key="index">
            <ul>
              <li>
                <p style="margin-bottom: 8px; height: 3vh">
                  <span style="font-weight: bold;">{{ item.HOUSEAPPLICANT }}</span>
                  <span style="float: right">
                     <span style="float: right">房屋用途{{ item.APPLYTIME }}</span>
                  </span>
                </p>
                <p style="margin-bottom: 8px; height: 3vh">
                  <span>房屋编号：{{ item.HOUSEAPPLICANT }}</span>
                  <span style="float: right">
                     <span style="float: right">申请时间：{{ item.APPLYTIME }}</span>
                  </span>
                </p>
                <p style="clear: both; display: flex; align-items: center">
                  <img
                    style="margin-right: 4px"
                    width="10"
                    src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/YPC/dingwei.png"
                  />
                  <span @click="gotoMap(item)" style="font-size: 14px; color: blue">
                  {{ item.PERMANENTADDR || '暂无数据' }}
                </span>
                </p>
              </li>
            </ul>
          </van-cell>
        </van-list>
      </div>
    </div>
    <div v-if="!isShow">
      <p style="width: 100%;text-align: center;font-weight: bold;margin-bottom: 10px;">建设房屋信息核查</p>
      <div style="height: 84vh;overflow:auto;">
        <van-field v-for="(item,index) in formArry" :key="index" v-model="formData[item.prop]" :label="item.name" :placeholder="'请填写'+item.name" />
        <van-field
          v-model="formData.message"
          rows="3"
          autosize
          label="审核意见"
          type="textarea"
          placeholder="请输入审核意见"
        />
      </div>
      <div class="footer">
        <van-button  style="width: 95%;" :style="{fontSize:showEdition?'14px':'20px'}"  type="info" @click="save()">提交</van-button>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "productionManagement",
    data() {
      return{
        SearchData:'',
        showEdition: false,
        loading: false,
        finished: false,
        contentData:[
          {
            HOUSEAPPLICANT:'111'
          },
        ],
        isShow:true,
        showPicker:false,
        columns:[],
        formData:{
          ZLFS:'',
          BLR:'',
          BLSJ:""
        },
        showPickerq:false,
        currentDate: new Date(),
        formArry:[
          {
            name:'申请人',
            prop:'XM'
          },
          {
            name:'申请时间',
            prop:'XM'
          },
          {
            name:'房屋编号',
            prop:'XM'
          },
          {
            name:'户主姓名',
            prop:'XM'
          },
          {
            name:'联系电话',
            prop:'XM'
          },
          {
            name:'所属地市',
            prop:'XM'
          },
          {
            name:'所属区县',
            prop:'XM'
          },
          {
            name:'所属乡镇',
            prop:'XM'
          },
          {
            name:'所属村',
            prop:'XM'
          },
          {
            name:'房屋地址',
            prop:'XM'
          },
          {
            name:'建筑层数',
            prop:'XM'
          },
          {
            name:'建造年份',
            prop:'XM'
          },
          {
            name:'房屋用途',
            prop:'XM'
          },
          {
            name:'房屋等级',
            prop:'XM'
          },
        ],
        fileList:[]
      }
    },
    methods:{
      onSearch(){

      },
      contentClick(item){
        // alert(1)
        this.isShow = false
      },
      onConfirm(data) {

      },
      onConfirmRQ(){

      }
    },
    mounted() {
      this.showEdition = this.$store.state.Edition
    }
  };
</script>

<style scoped lang="scss">
  #productionManagement{
    padding: 10px;
    text-align: center;
    .footer{
      width: 95%;
      position: fixed;
      bottom: 10px;
    }
  }
</style>
